package demo3;
interface IShape{
    /*public int a1 = 1;
    public static int a2 = 2;
    public static final int a3 = 3;
    int a4 = 4;*/
    /*default public void test(){
        System.out.println("这就是一个默认的方法");
    }
    public static void test2(){
        System.out.println();
    }*/

    void draw();
}
/*interface IA{

}*/

class Cycle implements IShape{

    @Override
    public void draw() {
        System.out.println("画⚪！");
    }
}
class Rect implements IShape {
    @Override
    public void draw() {
        System.out.println("画♦！");
    }
}
class Flower implements IShape {
    @Override
    public void draw() {
        System.out.println("画❀！");
    }
}
class Triangle implements IShape {
    @Override
    public void draw() {
        System.out.println("画▲！");
    }
}



public class TestDemo {

    public static void drawMap(IShape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        //Shape shape = new Shape();

        IShape iShape1 = new Cycle();
        IShape iShape2 = new Rect();
        IShape iShape3 = new Flower();

        drawMap(iShape1);
        drawMap(new Cycle());
        drawMap(iShape2);
        drawMap(iShape3);
    }
}
